//
//  SSHud.m
//  starspaceVR
//
//  Created by 曹端芹 on 17/9/14.
//  Copyright © 2017年 starspace. All rights reserved.
//

#import "SSHud.h"

@implementation SSHud

+ (void)showWritingInView:(UIView *)view {
    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];
    hud.margin = 10;
    hud.label.text = @"请稍后";
    [view.superview bringSubviewToFront:hud];
}

+ (void)dismissForView:(UIView *)view {
    [MBProgressHUD hideHUDForView:view animated:YES];
}

+ (void)showTip:(NSString *)tip InView:(UIView *)view {
    
    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];
    [view.superview bringSubviewToFront:hud];
    hud.mode = MBProgressHUDModeText;
    hud.label.numberOfLines = 0;
    hud.margin = 10;
    hud.label.font = kFont(14);
    hud.label.text = tip;
    [hud hideAnimated:YES afterDelay:0.5f];
}

@end
